// Place your Spring DSL code here
beans = {
	companyServiceServiceExporter(org.springframework.remoting.rmi.RmiServiceExporter) {
		serviceName = "CompanyService"
		service = ref("companyRemoteService")
		serviceInterface = "com.mera.tektronix.csviewer.common.api.ICompanyService"
		registryPort = "1199"
	}
	
	departmentServiceServiceExporter(org.springframework.remoting.rmi.RmiServiceExporter) {
		serviceName = "DepartmentService"
		service = ref("departmentRemoteService")
		serviceInterface = "com.mera.tektronix.csviewer.common.api.IDepartmentService"
		registryPort = "1199"
	}
	
	projectServiceServiceExporter(org.springframework.remoting.rmi.RmiServiceExporter) {
		serviceName = "ProjectService"
		service = ref("projectRemoteService")
		serviceInterface = "com.mera.tektronix.csviewer.common.api.IProjectService"
		registryPort = "1199"
	}
	
	employeeServiceServiceExporter(org.springframework.remoting.rmi.RmiServiceExporter) {
		serviceName = "EmployeeService"
		service = ref("employeeRemoteService")
		serviceInterface = "com.mera.tektronix.csviewer.common.api.IEmployeeService"
		registryPort = "1199"
	}
	
	companyTransformer(com.mera.tektronix.csviewer.transformers.CompanyTransformer) {
	}
	
	departmentTransformer(com.mera.tektronix.csviewer.transformers.DepartmentTransformer) {
	}
	
	projectTransformer(com.mera.tektronix.csviewer.transformers.ProjectTransformer) {
	}

	employeeTransformer(com.mera.tektronix.csviewer.transformers.EmployeeTransformer) {
	}
	
	mbeanServer(org.springframework.jmx.support.MBeanServerFactoryBean) {
		locateExistingServerIfPossible = true
	}
	
	log4jBean(org.apache.log4j.jmx.HierarchyDynamicMBean)
	
	hibernateBean(org.hibernate.jmx.StatisticsService) {
		statisticsEnabled = true
		sessionFactory = ref('sessionFactory')
	}
	
	mbeanExporter(org.springframework.jmx.export.MBeanExporter) {
		server = ref('mbeanServer')
		registrationBehaviorName = 'REGISTRATION_REPLACE_EXISTING'
		beans = [
			      'log4j:hierarchy=default': ref('log4jBean'),
				  'org.hibernate:name=statistics': ref('hibernateBean')
		        ]
	}
	
	configurationMBean(com.mera.tektronix.csviewer.jmx.ConfigurationMBean)
	
	assembler(org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler) {
		managedInterfaces = [com.mera.tektronix.csviewer.jmx.IConfigurationMBean]
	}
	
	configurationMBeanExporter(org.springframework.jmx.export.MBeanExporter) {
		server = ref('mbeanServer')
		registrationBehaviorName = 'REGISTRATION_REPLACE_EXISTING'
		assembler = ref('assembler')
		beans = [
				  'csviewerapp:name=configuration' : ref('configurationMBean')
				]
	}
	
	
}
